package ru.pachkun.home.russianpost.info;

import ru.pachkun.home.model.User;
import ru.pachkun.home.russianpost.info.logicinterface.LoginHelperInterface;

public class LoginHelper extends DriverBasedHelper implements
		LoginHelperInterface {

	public LoginHelper(ApplicationManager manager) {
		super(manager.getWebDriver());
	}

	@Override
	public void loginAs(User user) {
		pages.mainInfoPage.ensurePageLoaded()
			.switchToMainFrame().ensurePageLoaded()
			.setLogin(user.getLogin())
			.setPassword(user.getPassword())
			.clickSubmitButton().ensurePageLoaded();
	}
	
	//Пока не нужны
	@Override
	public void logout() {

	}

	@Override
	public boolean isLoggedIn() {
		return false;
	}

	@Override
	public boolean isNotLoggedIn() {
		return false;
	}

}
